<template>
	<div>
		<el-dialog title="查看详情" width="800px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
			<table class="table table-bordered" align="center" width="100%" style="word-break:break-all; margin-bottom:50px;  font-size:13px;">
				<tbody>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_id')}}：</td>
						<td>
							{{form.id}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_short_code')}}：</td>
						<td>
							{{form.short_code}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_code')}}：</td>
						<td>
							{{form.code}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_name')}}：</td>
						<td>
							{{form.name}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_pinyin')}}：</td>
						<td>
							{{form.pinyin}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_industry')}}：</td>
						<td>
							{{form.industry}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_region')}}：</td>
						<td>
							{{form.region}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_state')}}：</td>
						<td>
							{{form.state}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_concept')}}：</td>
						<td>
							{{form.concept}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_bourse')}}：</td>
						<td>
							{{form.bourse}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_stop')}}：</td>
						<td>
							<span v-if="form.stop == '0'">停牌</span>
							<span v-if="form.stop == '1'">正常</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_close')}}：</td>
						<td>
							<span v-if="form.close == '0'">退市</span>
							<span v-if="form.close == '1'">正常</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_buy_up')}}：</td>
						<td>
							{{form.buy_up}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_buy_down')}}：</td>
						<td>
							{{form.buy_down}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Stock_status')}}：</td>
						<td>
							<span v-if="form.status == '1'">正常</span>
							<span v-if="form.status == '0'">删除</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_type')}}：</td>
						<td>
							{{form.type}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_buy')}}：</td>
						<td>
							{{form.buy}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_sell')}}：</td>
						<td>
							{{form.sell}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_trade')}}：</td>
						<td>
							<span v-if="form.trade == '1'">是</span>
							<span v-if="form.trade == '0'">否</span>
						</td>
				</tr>
				<tr>
						<td class="title" width="100">{{$t('field.Stock_create_time')}}：</td>
						<td>
							{{parseTime(form.create_time)}}
						</td>
				</tr>
				<tr>
						<td class="title" width="100">{{$t('field.Stock_stop_time')}}：</td>
						<td>
							{{parseTime(form.stop_time)}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_lastamount')}}：</td>
						<td>
							{{form.lastamount}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_lastvolumn')}}：</td>
						<td>
							{{form.lastvolumn}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_control_ratio')}}：</td>
						<td>
							{{form.control_ratio}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_control_amount')}}：</td>
						<td>
							{{form.control_amount}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_control_remaining')}}：</td>
						<td>
							{{form.control_remaining}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_pclose')}}：</td>
						<td>
							{{form.pclose}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_stock_value')}}：</td>
						<td>
							{{form.stock_value}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Stock_enable_time')}}：</td>
						<td>
							{{parseTime(form.enable_time)}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Stock_stock_value_market')}}：</td>
						<td>
							{{form.stock_value_market}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Stock_first_acquisition_time')}}：</td>
						<td>
							{{parseTime(form.first_acquisition_time)}}
						</td>
				</tr>
				</tbody>
			</table>
		</el-dialog>
	</div>
</template>
<script>
import { detail  } from '@/api/app/stock'
export default {
	name:'stockdetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
		}
	},
	watch:{
		show(val){
			if(val){
			}
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
				this.form = res.data
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
